﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Xpus.Website.Data
{
	partial class Tag
	{
		#region 字段验证
		/// <summary>
		/// TagName字段长度最大值。
		/// </summary>
		public const int TagNameMaxLength = 64;

		/// <summary>
		/// AddedUserIP字段长度最大值。
		/// </summary>
		public const int AddedUserIPMaxLength = 128;

		partial void OnTagNameChanging(string value)
		{
			FieldChecker.CheckFieldNotNull("TagName", value);
			FieldChecker.CheckFieldTooLong("TagName", value, TagNameMaxLength);
		}

		partial void OnAddedUserIPChanging(string value)
		{
			FieldChecker.CheckFieldNotNull("AddedUserIP", value);
			FieldChecker.CheckFieldTooLong("AddedUserIP", value, AddedUserIPMaxLength);
		}
		#endregion
	}
}
